package com.bys.system.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.bys.generator.util.DateUtil;
import com.bys.system.model.SysMenuModel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;
@Schema(name = "菜单视图")
@EqualsAndHashCode(callSuper = false)
@Data
public class SysMenuVo  {
    @Schema(description = "id")
    private Long id;
    @Schema(description = "所属上级")
    private Long parentId;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "类型(0:目录,1:菜单,2:按钮)")
    private Integer type;

    @Schema(description = "路由地址")
    private String path;

    @Schema(description = "组件路径")
    private String component;

    @Schema(description = "权限标识")
    private String perms;

    @Schema(description = "图标")
    private String icon;

    @Schema(description = "排序")
    private Integer sortValue;

    @Schema(description = "状态(0:禁止,1:正常)")
    private Integer status;
    @JsonFormat(pattern = DateUtil.dateTimePattern)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    @Schema(description = "删除标识")
    private Boolean isDeleted;

    private List<SysMenuVo> children;
}
